Integrand size = 29, antiderivative size = 182 \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=-\frac {3 \left (a^2-2 b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))} \]
[Out]
Time = 0.31 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2969, 3134, 3080, 3855, 2739, 632, 210} \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {3 \left (a^2-2 b^2\right ) \arctan \left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{a^4 d \sqrt {a^2-b^2}}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2} \]
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rule 2969
Rule 3080
Rule 3134
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}+\frac {\int \frac {\csc (c+d x) \left (-6 b^2-2 a b \sin (c+d x)+\left (a^2+3 b^2\right ) \sin ^2(c+d x)\right )}{(a+b \sin (c+d x))^2} \, dx}{2 a^2 b} \\ & = \frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))}+\frac {\int \frac {\csc (c+d x) \left (-6 b^2 \left (a^2-b^2\right )-3 a b \left (a^2-b^2\right ) \sin (c+d x)\right )}{a+b \sin (c+d x)} \, dx}{2 a^3 b \left (a^2-b^2\right )} \\ & = \frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))}-\frac {(3 b) \int \csc (c+d x) \, dx}{a^4}-\frac {\left (3 \left (a^2-2 b^2\right )\right ) \int \frac {1}{a+b \sin (c+d x)} \, dx}{2 a^4} \\ & = \frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))}-\frac {\left (3 \left (a^2-2 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^4 d} \\ & = \frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))}+\frac {\left (6 \left (a^2-2 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^4 d} \\ & = -\frac {3 \left (a^2-2 b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a^4 \sqrt {a^2-b^2} d}+\frac {3 b \text {arctanh}(\cos (c+d x))}{a^4 d}+\frac {\left (a^2-3 b^2\right ) \cos (c+d x)}{2 a^2 b d (a+b \sin (c+d x))^2}-\frac {\cot (c+d x)}{a d (a+b \sin (c+d x))^2}-\frac {\left (a^2+6 b^2\right ) \cos (c+d x)}{2 a^3 b d (a+b \sin (c+d x))} \\ \end{align*}
Time = 2.19 (sec) , antiderivative size = 184, normalized size of antiderivative = 1.01 \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\frac {-\frac {6 \left (a^2-2 b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-a \cot \left (\frac {1}{2} (c+d x)\right )+6 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-6 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {a^2 \left (a^2-b^2\right ) \cos (c+d x)}{b (a+b \sin (c+d x))^2}-\frac {a \left (a^2+4 b^2\right ) \cos (c+d x)}{b (a+b \sin (c+d x))}+a \tan \left (\frac {1}{2} (c+d x)\right )}{2 a^4 d} \]
[In]
[Out]
Time = 0.73 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.18
method | result | size |
derivativedivides | \(\frac {-\frac {4 \left (\frac {-\frac {a \left (a^{2}-6 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {5 b \left (a^{2}+2 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {a \left (a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4}+\frac {5 a^{2} b}{4}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}^{2}}+\frac {3 \left (a^{2}-2 b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{4 \sqrt {a^{2}-b^{2}}}\right )}{a^{4}}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a^{3}}-\frac {1}{2 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4}}}{d}\) | \(214\) |
default | \(\frac {-\frac {4 \left (\frac {-\frac {a \left (a^{2}-6 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {5 b \left (a^{2}+2 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {a \left (a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4}+\frac {5 a^{2} b}{4}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}^{2}}+\frac {3 \left (a^{2}-2 b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{4 \sqrt {a^{2}-b^{2}}}\right )}{a^{4}}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a^{3}}-\frac {1}{2 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {3 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4}}}{d}\) | \(214\) |
risch | \(\frac {i \left (-2 i a^{3} b \,{\mathrm e}^{5 i \left (d x +c \right )}-3 i a \,b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+4 i a^{3} b \,{\mathrm e}^{3 i \left (d x +c \right )}+24 i a \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+2 a^{4} {\mathrm e}^{4 i \left (d x +c \right )}+9 a^{2} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+6 b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-2 i a^{3} b \,{\mathrm e}^{i \left (d x +c \right )}-21 i a \,b^{3} {\mathrm e}^{i \left (d x +c \right )}-2 a^{4} {\mathrm e}^{2 i \left (d x +c \right )}-18 b^{2} a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-12 b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+a^{2} b^{2}+6 b^{4}\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+i b +2 a \,{\mathrm e}^{i \left (d x +c \right )}\right )^{2} b^{2} a^{3} d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a -a^{2}+b^{2}}{b \sqrt {-a^{2}+b^{2}}}\right )}{2 \sqrt {-a^{2}+b^{2}}\, d \,a^{2}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a -a^{2}+b^{2}}{b \sqrt {-a^{2}+b^{2}}}\right ) b^{2}}{\sqrt {-a^{2}+b^{2}}\, d \,a^{4}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a +a^{2}-b^{2}}{b \sqrt {-a^{2}+b^{2}}}\right )}{2 \sqrt {-a^{2}+b^{2}}\, d \,a^{2}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a +a^{2}-b^{2}}{b \sqrt {-a^{2}+b^{2}}}\right ) b^{2}}{\sqrt {-a^{2}+b^{2}}\, d \,a^{4}}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{4} d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{4} d}\) | \(582\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 490 vs. \(2 (173) = 346\).
Time = 0.38 (sec) , antiderivative size = 1064, normalized size of antiderivative = 5.85 \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\int \frac {\cos ^{4}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{3}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.50 \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=-\frac {\frac {6 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{4}} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} + \frac {6 \, {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} {\left (a^{2} - 2 \, b^{2}\right )}}{\sqrt {a^{2} - b^{2}} a^{4}} - \frac {6 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {2 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 14 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5 \, a^{2} b\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )}^{2} a^{4}}}{2 \, d} \]
[In]
[Out]
Time = 12.12 (sec) , antiderivative size = 956, normalized size of antiderivative = 5.25 \[ \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{(a+b \sin (c+d x))^3} \, dx=\text {Too large to display} \]
[In]
[Out]